import { http } from './http'
import { PageQueryParams, PageResponse } from '@/config/page'

/**
 * 获取根团队列表。
 */
export function queryRootTeams (ownId: number, ownType: 'enterprise' = 'enterprise') {
  return http().get<any[]>(`/api/account/teams/root/${ownType}/${ownId}/teams`)
}

/**
 * 获取子团队列表。
 */
export function queryTeamsByParent (parentId: number) {
  return http().get<any[]>(`/api/account/teams/parent/${parentId}/teams`)
}

/**
 * 模糊查询企业团队列表。
 */
export function searchTeams (entId: number, keyword: string) {
  return http().get<any[]>(`/api/account/teams/ent/${entId}/like`, { params: { keyword } })
}
